<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            width:100%;
            height: 100%;
        }
        #div1{
            display: none;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-top: -150px;
            margin-left: -250px;
            height: 300px;
            width: 500px;
            background-color: #aaaaaa;
        }
        #div2{
            position: absolute;
            top:50%;
            left:50%;
            transform:translate(-50%,-50%);
            -webkit-transform:translate(-50%,-50%);
            -moz-transform:translate(-50%,-50%);
            -ms-transform:translate(-50%,-50%);
            width: 450px;
            height: 250px;
            background-color: aliceblue;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        ul li{
            display: flex;
            list-style: none;
            align-items: center;
            height: 50px;
        }
        ul div{
            display: inline-block;
            height: 28px;
            width: 32px;
            margin:10px;
            text-align: center;
            line-height: 28px;
        }
        ul button{
            display: inline-block;
            margin: 0 auto;
        }
        #box{
            height: 200px;
            width: 200px;
            border: 2px solid black;
        }
    </style>
    <script>
        window.onload=function () {
            var obtn=document.getElementById('obtn');
            var odiv1=document.getElementById('div1');
            var oBox=document.getElementById('box');
            var ored=document.getElementById('red');
            obtn.onclick=function () {
                odiv1.style.display='block'
                ored.onclick=function () {
                    oBox.style.backgroundColor='red';
                }
            }
        }
    </script>
</head>
<body>
    <button id="obtn">设置
    </button>
    <div id="div1">
        <div id="div2">
            <ul>
                <li>颜色
                    <div id="red">红</div>
                    <div>黄</div>
                    <div>蓝</div>
                </li>
                <li>宽:
                    <div>200</div>
                    <div>300</div>
                    <div>400</div>
                </li>
                <li>高:
                    <div>200</div>
                    <div>300</div>
                    <div>400</div>
                </li>
                <li>
                    <button>恢复</button>
                    <button>确定</button>
                </li>
            </ul>
        </div>
    </div>
<div id="box">

</div>
</body>
</html>